package com.xkdx.caipiao.presistence.hongbao;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import com.xkdx.caipiao.module.network.AbsAction;

public class HongbaoAction extends AbsAction {
	String uid,token,signcode;
	public int flag;//0:可用红包。1:过期红包
	public HongbaoAction(String uid, String token,String signcode ) {
		this.uid = uid;
		this.token = token;
		this.signcode = signcode;
		
	}

	@Override
	public void constructRequest() {
		HashMap<String, String> map = new HashMap<String, String>();
		map.put("uid", uid);
		map.put("logintoken", token);
		map.put("signcode", signcode);
		String json = constructJson(map);
		Parameter parameter = null;
		if(0 == flag){
			parameter = new Parameter("User", "GetRedPacketUseList", json);
		}else if(1 == flag){
			parameter = new Parameter("User", "GetRedPacketDisUseList", json);
		}

		List<Parameter> list = new ArrayList<Parameter>();
		list.add(parameter);
		requestData = constructMod(list);
	}

}
